<?php

  //to do: improve the way to pass two or more parameters in the paged-table ( link )
    
  $aux = explode ( '|', $_GET['id'] );
  $index=0;
  $SalaryscheduleUid = str_replace ( '"', '', $aux[$index++] );

  require_once ( PATH_PLUGINS . 'hr' . PATH_SEP . 'class.hr.php');
  $pluginObj = new hrClass ();

  require_once ( "classes/model/HrSalarySchedule.php" );
  //if exists the row in the database propel will update it, otherwise will insert.
  $tr = HrSalarySchedulePeer::retrieveByPK( $SalaryscheduleUid  );
  
  if ( ( is_object ( $tr ) &&  get_class ($tr) == 'HrSalarySchedule' ) ) { 
     $fields['SALARYSCHEDULE_UID'] = $tr->getSalaryscheduleUid();
     $fields['LABEL_SALARYSCHEDULE_UID'] = $tr->getSalaryscheduleUid();
     $fields['JOB_ID'] = $tr->getJobId();
     $fields['LABEL_JOB_ID'] = $tr->getJobId();
     $fields['STEPSALARY_ID'] = $tr->getStepsalaryId();
     $fields['LABEL_STEPSALARY_ID'] = $tr->getStepsalaryId();
     $fields['DEGREESALARY_ID'] = $tr->getDegreesalaryId();
     $fields['LABEL_DEGREESALARY_ID'] = $tr->getDegreesalaryId();
     $fields['SALARY'] = $tr->getSalary();
     $fields['LABEL_SALARY'] = $tr->getSalary();
  }
  else
    $fields = array();  
  
  $G_MAIN_MENU = 'processmaker';
  $G_SUB_MENU = 'hr/menuhrEmployee';
  $G_ID_MENU_SELECTED = 'ID_HR_EMP';
  $G_ID_SUB_MENU_SELECTED = 'ID_HR_JOBS';


  $G_PUBLISH = new Publisher;
  $G_PUBLISH->AddContent('xmlform', 'xmlform', 'hr/hrSalaryScheduleDelete', '', $fields, 'hrSalaryScheduleDeleteExec' );
  G::RenderPage('publish', 'blank');   
?>